
<% /**
	* navbar.jsp
	* 
	* This is a code snippet which maintains the history of visited pages, and appends the back,
	* home, and logout buttons to each page which imports this.
	*
	* @author Chris Avery
	*/
%>

<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
   	pageEncoding="ISO-8859-1"%>
<%@page import="b1w1nn1ng.crossf1t.db.*"%>
<%@page import="b1w1nn1ng.crossf1t.gui.*"%>
<%@page import="b1w1nn1ng.crossf1t.business.*"%>
<%@page import="java.util.ArrayList" %>

<%! 
/* This is the stack of page URLs we've visited. The most recent are at the end.
 * To pop something off the stack, make a "String x = stack.remove(stack.size() - 1)" call.
 * Every time a new unique page is called, it's put onto the stack automatically.
 */
static ArrayList<String> stack = new ArrayList<String>();
%>
<%
	//Update the stack if neccessary
	HistoryStack.push(request);
%>

<div class="navbackground">
<form>
<a class="navbutton" href="#" onclick="this.blur(); window.location.href='/crossfit/backPage.jsp'"><span>Back</span></a>
<a class="navbutton" href="#" onclick="this.blur(); window.location.href='/crossfit/user/home.jsp'"><span>Home</span></a>
<a class="navbutton" href="#" onclick="this.blur(); window.location.href='/crossfit/invalidate.jsp'"><span>Logout</span></a>
<!--  Old: 
<input class="button" type="button" value="Back" onclick="window.location.href='/cs135/backPage.jsp'" />
<input type="button" value="Home" onclick="window.location.href='/cs135/user/home.jsp'" />
<input type="button" value="Log out" onclick="session.invalidate();	response.sendRedirect(application.getContextPath());" />
 -->
</form>
</div>